#
nums1 = [i for i in range(10)]
print(nums1)

nums2 = [i for i in range(10) if i % 2 == 0]
print(nums2)

points = [(x, y) for x in range(3, 8) for y in range(4, 10)]
print(points)

#  list推导式相当于：
points1 = []
for i in range(3, 8):
    for j in range(4, 10):
        p = (i, j)
        points1.append(p)
print(points1)


# 了解即可
m = [i for i in range(1, 101)]
print(m)
n = [m[j:j + 3] for j in range(0, 100, 3)]  # range(start, end, step)
print(n)
